更新先享卡订单
当用户在商户侧消费时,用户完成微信先享卡的目标或者领取奖励时,商户需要将信息同步至微信先享卡平台,用于在微信先享卡小程序展示及先享卡到期后的用户结算。 官方文档
js
wxpay.v3.discountCard.orders._out_order_no_.patch({
objectives,
rewards,
}, { out_order_no, })
.then(
({
data: {
out_order_no,
order_id,
},
}) => ({
out_order_no,
order_id,
})
)
通过先享卡订单号查询订单
商户可以通过先享卡订单号或商户订单号查询用户目前的先享卡使用情况、订单状态,可用于对账或者界面展示。 官方文档
js
wxpay.v3.discountCard.orders._out_order_no_.get({
out_order_no,
})
.then(
({
data: {
out_order_no,
discount_card_id,
out_trade_no,
appid,
service_id,
order_id,
transaction_id,
openid,
card_begin_time,
card_end_time,
card_name,
objective_description,
reward_description,
estimated_reward_amount,
online_instructions,
offline_instructions,
state,
total_amount,
deduction_amount,
settlement_amount,
create_time,
pay_time,
objectives,
rewards,
},
}) => ({
out_order_no,
discount_card_id,
out_trade_no,
appid,
service_id,
order_id,
transaction_id,
openid,
card_begin_time,
card_end_time,
card_name,
objective_description,
reward_description,
estimated_reward_amount,
online_instructions,
offline_instructions,
state,
total_amount,
deduction_amount,
settlement_amount,
create_time,
pay_time,
objectives,
rewards,
})
)